package com.karst.webnotes.chapter03
{
	import flash.events.Event;
	
	import org.aswing.AsWingManager;
	import org.papervision3d.objects.primitives.Sphere;
	import org.papervision3d.view.BasicView;
	
	internal class SphereExample extends BasicView
	{
		public function SphereExample()
		{
			super() ;
			createView() ;
			startRendering() ;
		}
		
		private var sphere : Sphere  = null ; // 平面
		private function createView() : void
		{
			if( sphere == null )
				sphere = new Sphere( null, 300, 16, 12 ) ;
			scene.addChild( sphere ) ;
		}
		
		override protected function onRenderTick( event : Event = null ) : void
		{
			super.onRenderTick() ;
			if( sphere )
				sphere.localRotationY-- ;
		}
	}
}